<?php
namespace app\jquery\controller;
use think\Controller;
//use think\Request;


// use think\Db;
class Rejest extends Controller
{
   public function checkName(){
       //接受index19传来的值
       // http://www.2018a.com/47.94.136.51/t5/public/note.php/jquery/Rejest/checkName?nick=%E5%92%8C%E4%BA%AC%E5%87%AF
    $user1=input('get.nick');
  //   $roundma = input('get.roundma');
  $time = date("Y-m-d H:i:s"); 
  //mylog.log在 public下  static/mylog.log 在 public/static 下 ../mylog.log在t5下 ../note/mylog.log 在t5/note 下
	file_put_contents("../note/mylog.log","ok***".$user1."登录1时间".$time."\r\n",FILE_APPEND);
	if($user1 == '何京凯'){
        $coun = 1;
    }else{
        $coun = 0;
    }; 
   
		if($coun>0){  
		  echo '1';
		}else{
		   echo'0';
		}
		}
   
/**
 * 从index20 传来值
 */
    public function chec1(){
      $username=input('post.username');
      if($username=="shunping"){
        echo  "{'res':'用户名不能用','info':'哈哈'}";
      }else{
          echo  "{'res':'用户名能用','info':'嘻嘻嘻'}";
    }

    }

/**
 * 从21传来
 */

public function chec2(){
  $username=input('post.username');
  if($username=="shunping"){
    echo "<result><res>不可以用</res><info>哈哈</info></result>";
}else{

  echo "<result><res>可以用</res><info>嘻嘻</info></result>";
}


}


	}
